A portable Internet system is a next generation communication technology that supports mobility for local area data communication using a fixed access point such as a wireless local area network (WLAN), and standardization in the portable Internet system is in progress by IEEE 802.16 and IEEE 802.16e. Similar to a mobile communication service, the portable Internet system supports a handover between a subscriber and a base station, and dynamically allocates an Internet Protocol (IP) address according to movement of the subscriber.
The portable Internet system employs orthogonal frequency division multiplexing (OFDM) for modulation and demodulation, and frequency division multiple access (FDMA)/time division multiple access (TDMA) for user multiplexing. Such a portable Internet system guarantees quality of service by classifying packets for priority-based transmission. Therefore, a terminal queues uplink data from an application layer in a wait queue and prioritizes the queued data by applying various QoS policies before transmission.
In the terminal of the portable Internet system, a classifier classifies the uplink data, a packet processor prioritizes the queued uplink data in the wait queue for priority-based transmission. Herein, an interrupt and an interrupt handling routine are called by a Linux kernel and a tasklet is scheduled. The tasklet calls the classifier such that user packets are passed to the classifier of the mobile terminal. In other words, the classifier and wait queue operation-related routines are operated as a part of the tasklet.
A process of prioritizing the packets in the wait queue is similar to a daemon process that independently runs in the background, ignoring interrupts, and thus processed by a kernel thread of the Linux kernel. Therefore, the uplink data is processed by the classifier operated by the tasklet and the packet processor is operated by the kernel thread by using the wait queue as common data.
However, the tasklet has an interrupt-based routine and thus an atomic operation is not guaranteed. In other words, another tasklet may be driven before completion of a given tasklet. Considering that the uplink data is an asynchronous event, frequent occurrence of the event may generate frequent interrupts thereby causing a plurality of tasklets to be overlapped.
The classifier performs a queue insertion operation to store data in the wait queue. The queue insertion operation changes a link structure in a link list by nature, and thus modification of a data structure related to the queue insertion operation must be mutually exclusive. Otherwise, the data structure may be unexpectedly changed thereby causing an undesirable operation.
However, the classifier is operated by the tasklet and thus the atomic operation may not be guaranteed, as described. Thus, there still exists a risk of erroneous modification of the data structure since the queue related operations may not be mutually exclusive. Moreover, the erroneous modification of the data structure may cause a system fault.